package ru.inse.core.domain.dict;

import ru.inse.core.domain.BaseEntity;



public class City
    extends BaseEntity
{
    private String name;

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    @Override
    public boolean equals(Object o)
    {
        if (!super.equals(o))
        {
            return false;
        }
        City other = (City)o;
        if (getName() == null)
        {
            return false;
        }
        return getName().equals(other.getName());
    }

    @Override
    public int hashCode()
    {
        int hash = 7;
        hash = accumulateHashCode(hash, getName());
        return hash;
    }

    @Override
    protected void addCustomFieldForToString(StringBuilder sb)
    {
        addFieldToStringBuffer(sb, "name", getName());
    }
}
